<!DOCTYPE html>

<html>
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <link rel="stylesheet" href="/stylesheets/home.css">
</head>
<body>

    <h1>首页</h1>

    <a href="/user/hello">点击超链接发送GET请求</a>
    &nbsp;&nbsp; | &nbsp;&nbsp;
    <a href="/user/list">点击我可以获得用户列表</a>

    <hr>

    <!-- enctype 默认值是 application/x-www-form-urlencoded -->
    <form action="/user/register" method="post" enctype="application/x-www-form-urlencoded">
        用户注册(POST)
        <input type="text" name="username" placeholder="用户名" >
        <input type="password" name="password" placeholder="密码">
        <input type="password" name="comfirm" placeholder="确认密码">
        <button type="submit">注册</button>
    </form>

    <hr>

    <!-- 指定 enctype 为 text/plain -->
    <form action="/user/register" method="post" enctype="text/plain">
        用户注册(POST)
        <input type="text" name="username" placeholder="用户名" >
        <input type="password" name="password" placeholder="密码">
        <input type="password" name="comfirm" placeholder="确认密码">
        <button type="submit">注册</button>
    </form>

    <hr>

    <form action="/user/login" method="get">
        用户登录(GET)
        <input type="text" name="username" placeholder="用户名" >
        <input type="password" name="password" placeholder="密码">
        <button type="submit">登录</button>
    </form>

    <img src="/images/ship.webp">

    <script src="/javascript/async.js"></script>

</body>
</html>